package com.markedquilt.dao;
/*
 * PackageName: com.markedquilt.my_session.dao
 * Author:   coke
 * Date:     Created in 2020/11/22 13:14
 * Description:
 * History:
 * <author>        <time>             <version>          <desc>
 * 作者姓名         修改时间            版本号              描述
 * coke           2020/11/22 13:14     1.0
 */

import com.markedquilt.entity.Resume;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * @author ZhangKe
 * @Project my_session
 * @Description
 * @date 2020/11/22 13:14.
 */
@Mapper
public interface ResumeDao {

    @Select("SELECT * FROM tb_resume where id = #{id}")
    Resume findById(int id);

    @Select("SELECT * FROM tb_resume")
    List<Resume> getList();

    @Delete("DELETE from tb_resume where id=#{id}")
    int deleteById(int id);

    @Update("update tb_resume set address=#{address},name=#{name},phone=#{phone}")
    int updateById(Resume resume);
}
